<?

// Mates! - This file contains all global configuration variables
// Authors:
//   Ayush Agarwal <yush@umich.edu>
//   Adam Herscher <ahersche@umich.edu>
//   Jeff Powers <jrpowers@umich.edu>

// mysql username
$GLOBALS['dbuser'] = "mates";

// mysql password
$GLOBALS['dbpass'] = "@ja6rocs";

// mysql database name
$GLOBALS['dbname'] = "mates";

// mysql database hostname
#$GLOBALS['dbhost'] = "localhost";
$GLOBALS['dbhost'] = ":/var/run/mysqld/mysqld.sock";

// if set to 1, service will return true db errors (for development use only),
// otherwise service will return generic "Unable to communicate with database" errors.
$GLOBALS['show_true_db_errors'] = 1;

// Max distance in feet to be considered a "nearby location" (for location guessing)
// loc_rel table must be rebuilt for changes to this parameter to take effect.
$GLOBALS['NEARBY_LOC_DIST_LIMIT_FT'] = 500;

// Max distance in feet to be considered a "nearby location" (for relationship generation)
// loc_rel table must be rebuilt for changes to this parameter to take effect.
$GLOBALS['NEARBY_REL_LOC_DIST_LIMIT_FT'] = 500;

// Number of seconds between background script runs
$GLOBALS['BG_SLEEP'] = 60;

// Number of minutes after which idle users are logged out
// Note: This has nothing to do with user actions but rather which client refresh requests.
//       If client stops refreshing, it is assumed to have been closed without properly logging out, 
//       and the background script logs the user out in order to prevent queue buildup.
$GLOBALS['IDLE_TIMEOUT'] = 10;

// Weight given to an ip address for each time it has been seen
$GLOBALS['GUESSLOC_IP_WEIGHT'] = 1;

// Weight given to an access point mac address for each time it has been seen
$GLOBALS['GUESSLOC_MAC_WEIGHT'] = 5;

// Weight given to an ip address for each time it has been seen by THIS user
$GLOBALS['GUESSLOC_USER_IP_WEIGHT'] = $GLOBALS['GUESSLOC_IP_WEIGHT'] * 3;

// Weight given to an access poitn mac address for each time it has been seen by THIS user
$GLOBALS['GUESSLOC_USER_MAC_WEIGHT'] = $GLOBALS['GUESSLOC_MAC_WEIGHT'] * 3;

// invalid username
$GLOBALS['err_username'] = "Username must consist of letters and numbers only and be 3-8 characters long.";

// invalid password
$GLOBALS['err_password'] = 'Password must consist of letters, numbers and special characters !@#$%^&*-_=+()[]{}\|;:,<.>/?~ only, and be 6-20 characters long.';

// invalid location name
$GLOBALS['err_locname'] = 'Location name must consist of letters, numbers, spaces, and special characters !@#$%^&*-_=+()[]{}\|;:,<.>/?~ only, and be 1-50 characters long.';

// generic string (course, interest, etc)
$GLOBALS['err_generic'] = 'Input must consist of letters, numbers, spaces and special characters !@#$%^&*-_=+()[]{}\|;:,<.>/?~ only, and be 1-255 characters long.';

?>